package models

import (
	"gitee.com/lzqysoft/ims/libs/encrypt"
	"github.com/astaxie/beego/orm"
)

type Suggest struct {
	Id     string `orm:"column(id);pk"`
	Score   int `orm:"column(score);null"`
	Suggest string `orm:"column(suggest);null"`
}
func (t *Suggest) TableName() string {
	return "sf_evaluate"
}

func init() {
	orm.RegisterModel(new(Suggest))
}

func AddSuggest(score int, suggest string) {
	o := orm.NewOrm()
	var s Suggest
	s.Id = encrypt.GetGuid()
	s.Score = score
	s.Suggest = suggest
	o.Insert(&s)
}